package cn.itcast.ssm.util;

import java.io.*;
import java.util.Scanner;


public class iotest {
    public static void main(String[] args)  {
       //
        while(true){
        Scanner scanner = new Scanner(System.in);
        String s = scanner.nextLine();
        if(s.equals("quit")){
            break;
        }
        FileWriter fileWriter = null ;
        File file = new File("D:\\workplace\\spliderWeb\\src\\main\\Resources\\aaa.txt");
        try {
            fileWriter  = new FileWriter(file,true);
            fileWriter.write(s);
            fileWriter.flush();
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        }finally {
            try {
                fileWriter.close();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
        }
    }
}
